<template>
    <div id="preViewPdf" class="pdfcss"></div>
</template>
<script setup>
import Pdfh5 from 'pdfh5'
import 'pdfh5/css/pdfh5.css'
import { reactive, onMounted } from 'vue'
import { useRouter } from 'vue-router'
import { Dialog } from 'vant'
const router = useRouter()
const state = reactive({
    url: '',
    pdfh5: ''
})

onMounted(async () => {
    state.pdfh5 = new Pdfh5('#preViewPdf', {
        pdfurl: state.url, // 地址
        // lazy: true, // 是否懒加载
        withCredentials: true
        // renderType: 'svg'
    })

})
</script>
<style lang="less" scoped>
.pdfcss {
    height: 100vh;
}
</style>